#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<assert.h>
void* my_memcpy(void* a, const void* b, int num)
{
	assert(a && b);
	void* ret = a;
	while (num--)
	{
		*((char*)a) = *((char*)b);
		a = (char*)a + 1;
		b = (char*)b + 1;
	}
	return ret;
}
int main()
{
	int arr1[10] = { 1,2,3 };
	int arr2[10] = { 4,5,6 };
	void* ps = my_memcpy(arr1 + 3, arr2, 12);
	int i = 0;
	for (i = 0; i < 10; i++)
	{
		printf("%d ", arr1[i]);
	}
	return 0;
}